package song;

import java.util.ArrayList;

/**
 * Created by IntelliJ IDEA.
 * User: Aleksey
 * Date: 02.01.2008
 * Time: 18:49:47
 */
public class DrumTrack {
    private ArrayList<DrumSubTrack> subTracks;
    private ArrayList<Bar> downbeats;

    public DrumTrack() {
        subTracks = new ArrayList<DrumSubTrack>();
        downbeats = new ArrayList<Bar>();
    }

    public Integer getSubTrackCount() {
        return subTracks.size();
    }

    public void addSubTrack(DrumSubTrack subTrack) {
        subTracks.add(subTrack);
    }

    public DrumSubTrack getSubTrack(Integer index) {
        return subTracks.get(index);
    }

    public void removeSubTrack(Integer index) {
        subTracks.remove(index.intValue());
    }

    public void addDownbeat(Bar downbeat) {
        downbeats.add(downbeat);
    }

    public Bar getDownbeat(Integer index) {
        return downbeats.get(index);
    }

    public void insertDownbeat(Integer index, Bar downbeat) {
        downbeats.add(index, downbeat);
    }

    public void deleteDownbeat(Integer index) {
        downbeats.remove(index.intValue());
    }
}
